﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cpartySearch.aspx.cs" Inherits="Customer_Profile.eCard.cpartySearch" %>

<%@ Register Src="../mainTop.ascx" TagName="mainTop" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Customer List</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
    <meta content="C#" name="CODE_LANGUAGE" />
    <meta content="JavaScript" name="vs_defaultClientScript" />
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/style.css" type="text/css" rel="stylesheet" />
    <script language="javascript" type="text/javascript" src="/js/common.js"></script>
    <script language="javascript" type="text/javascript" src="/js/CalPopUp.js"></script>
     <script language="javascript" type="text/javascript">
         function refresh() {
             this.location = this.location;
         }

         function checkform() {
             var cparty_name = document.getElementById("txtCpartyName").value;
             var id_no = document.getElementById("txtIDNo").value;             
             if (cparty_name == '' && id_no=='') {
                 alert("客户姓名、证件号码必须填写一个！");
                 return false;
             }             
             return true;
         }
    </script>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
    <form id="Form1" name="form1" action="" method="post" runat="server">
        <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
                <td width="1" background="/images/dot_vline.gif">
                    <img height="1" src="/images/spacer.gif" width="1"></td>
                <td valign="top" width="15">
                    <img height="1" src="/images/spacer.gif" width="15"></td>
                <td valign="top">
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td style="height: 23px">
                                <uc1:mainTop ID="MainTop1" runat="server" />
                                <span class="navi-blu"><span class="navi-blk">个人旅行卡管理 &gt; 客户管理 &gt; 客户查询</span>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td background="/images/dot_hline.gif">
                                <img height="1" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                    <table style="position: relative; top: 6px" cellspacing="0" cellpadding="0" width="100%"
                        border="0">
                        <tr>
                            <td>
                                <img height="6" src="/images/corner_lft1.gif" width="6"></td>
                            <td>
                                <div align="right">
                                    <img height="6" src="/images/corner_rgt1.gif" width="6"></div>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="1" cellpadding="4" width="100%" bgcolor="#c8c8c8" border="0">
                        <tr bgcolor="#e9e9e9">
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="160" style="height: 18px">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">购卡人(乙方)姓名：</td>
                                        <td>                                            
                                            <asp:TextBox ID="txtCpartyName" CssClass="input2" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <%--<td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="100">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">地区：</td>
                                        <td>
                                            <asp:DropDownList ID="dropEntity" runat="server" Width="135">
                                            </asp:DropDownList>
                                        </td>                                        
                                    </tr>
                                </table>
                            </td>--%>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="100">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">证件号码：</td>
                                        <td>
                                            <asp:TextBox ID="txtIDNo" CssClass="input2" runat="server"></asp:TextBox>
                                        </td>                                        
                                    </tr>
                                </table>
                            </td>
                            <td>
                                 <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td>
                                            <div align="center">                                                
                                                <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClientClick="return checkform()" class="button" onclick="btnSearch_Click" />&nbsp;
                                                <asp:Button ID="btnAdd" runat="server" Text="添加" class="button" 
                                                    onclick="btnAdd_Click" />&nbsp;
                                                </div>
                                        </td>                                      
                                    </tr>
                                </table>
                            </td>
                        </tr>                     
                    </table>
                    <table style="position: relative; top: -6px" cellspacing="0" cellpadding="0" width="100%"
                        border="0">
                        <tr>
                            <td>
                                <img height="6" src="/images/corner_lft2.gif" width="6"></td>
                            <td>
                                <div align="right">
                                    <img height="6" src="/images/corner_rgt2.gif" width="6"></div>
                            </td>
                        </tr>
                    </table>                    
                    <table bordercolor="#c2d2e2" cellspacing="0" cellpadding="2" width="100%" border="1">
                        <tr>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td bgcolor="#1765a7">
                                            <img height="11" src="/images/pic_results.gif" width="61"></td>
                                    </tr>
                                </table>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td class="bglist" width="3%">编码</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">客户姓名</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>                                       
                                        <td class="bglist" width="7%">电话</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">证件类型</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="15%">证件号码</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">性别</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="10%">生日</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="15%">邮箱</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">邮编</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="20%">住址</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">修改</td>                                        
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">账户</td>                                        
                                    </tr>
                                    <tr>
                                        <td colspan="23">
                                            <asp:GridView ID="GvData" runat="server" ShowHeader="false" AutoGenerateColumns="False"
                                                BorderWidth="2px" Width="100%" HorizontalAlign="Center"
                                                Font-Size="Smaller" DataKeyNames="cparty_id"
                                                OnRowDataBound="GvData_RowDataBound" AllowPaging="True" OnPageIndexChanging="GvData_PageIndexChanging" PageSize="20">
                                                <HeaderStyle HorizontalAlign="Center" BorderStyle="Groove" BackColor="#C0C0FF" />
                                                <RowStyle HorizontalAlign="Center" CssClass="bglist-2" />
                                                <Columns>                                                            
                                                    <asp:TemplateField HeaderText="status" ItemStyle-Width="3%">
                                                        <ItemTemplate>
                                                            <asp:Label ID="LinkButton1" Text='<%#Eval("cparty_id") %>' runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="cparty_name" HeaderText="客户姓名">
                                                        <ItemStyle Width="5%" />
                                                    </asp:BoundField>                                                         
                                                    <asp:BoundField DataField="phone" HeaderText="电话">
                                                        <ItemStyle Width="7%" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="id_type" HeaderText="证件类型" ItemStyle-Width="5%">
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="id_no" HeaderText="证件号码">
                                                        <ItemStyle Width="15%" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="sex" HeaderText="性别">
                                                        <ItemStyle Width="5%" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="birthday" HeaderText="生日"  DataFormatString="{0:yyyy-MM-dd}">
                                                        <ItemStyle Width="10%" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="email" HeaderText="邮箱">
                                                        <ItemStyle Width="15%" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="zipcode" HeaderText="邮编">
                                                        <ItemStyle Width="5%" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="address" HeaderText="住址">
                                                        <ItemStyle Width="20%" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="edit" ShowHeader="False" ItemStyle-Width="5%">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgEdit" ImageUrl="~/images/search1.gif" Width="20px" Height="20px" runat="server" ></asp:ImageButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="show" ShowHeader="False" ItemStyle-Width="5%">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbt" ImageUrl="~/images/search1.gif" Width="20px" Height="20px" runat="server" ></asp:ImageButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <img height="3" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                    <br>
                </td>
                <td valign="top" width="10">
                    <img height="1" alt="" src="/images/spacer.gif" width="10"></td>
            </tr>
        </table>
    </form>
</body>
</html>